-- GENERATED SPELL FOR [The Duke of Shards] --


function spell0_15208(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_15208', 638, 1)
end

function spell1_15208(pUnit, Event) --@Ground Tremor,Self--
pUnit:FullCastSpellOnTarget(6524,pUnit)
pUnit:RegisterEvent('Sorts_15208', 2000, 1)
end

function spell2_15208(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15208', 622, 1)
end

function spell3_15208(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(8078,pUnit)
pUnit:RegisterEvent('Sorts_15208', 10323, 1)
end

function Sorts_15208(pUnit, Event)
local choix_sorts_15208 = math.random(0, 3)
if choix_sorts_15208 == 0 then
pUnit:RegisterEvent('spell0_15208', 1, 1)
end
if choix_sorts_15208 == 1 then
pUnit:RegisterEvent('spell1_15208', 1, 1)
end
if choix_sorts_15208 == 2 then
pUnit:RegisterEvent('spell2_15208', 1, 1)
end
if choix_sorts_15208 == 3 then
pUnit:RegisterEvent('spell3_15208', 1, 1)
end
end

function mob15208_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15208', math.random(1500, 3000), 1)
end

function mob15208_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15208_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15208_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15208, 1, 'mob15208_Action')
RegisterUnitEvent(15208, 2, 'mob15208_Leave')
RegisterUnitEvent(15208, 3, 'mob15208_Kill')
RegisterUnitEvent(15208, 4, 'mob15208_Die')
